Class EventConsumer

Kafka Consumer that forwards received messages as events to the application.

Thin abstraction on top of Consumer.

Inheritance
System.Object
EventConsumer
Namespace:RdKafka
Assembly:cs.temp.dll.dll
Syntax
public class EventConsumer : Consumer, IDisposable

Constructors

EventConsumer(Config, String)

Declaration
public EventConsumer(Config config, string brokerList = null)
Parameters
Type Name Description
Config config
System.String brokerList

Methods

Dispose()

Declaration
public override void Dispose()

Start()

Start automatically consuming message and trigger events.

Will invoke OnMessage, OnEndReached and OnError events.

Declaration
public void Start()

Stop()

Declaration
public Task Stop()
Returns
Type Description
Task

Events

OnEndReached

Declaration
public event EventHandler<TopicPartitionOffset> OnEndReached

OnError

Declaration
public event EventHandler<ErrorCode> OnError

OnMessage

Declaration
public event EventHandler<Message> OnMessage